const apis = {
  user: {
    page: '/admin/user',
    add: '/admin/user/update',
    update: '/admin/user/update',
    setRole: '/admin/user/roles/add',
    updatePassword: '/admin/user/update/password',
    updateCurrent: '/admin/current/user/update',
    all: '/admin/user/list',
    addUserRoles: '/admin/user/roles/add',
    getUserRoles: '/admin/user/roles',
    getUserApps: '/admin/user/apps'
  },
  role: {
    page: '/admin/role',
    add: '/admin/role/update',
    update: '/admin/role/update',
    remove: '/admin/role/remove',
    all: '/admin/role/list',
    setUser: '/admin/role/save/users',
    getRoleUsers: '/admin/role/users',
    addRoleUsers: '/admin/role/save/users'
  },
  developer: {
    page: '/admin/developer',
    add: '/admin/developer/add',
    update: '/admin/developer/update',
    remove: '/admin/developer/remove',
    all: '/admin/developer/list',
    updatePassword: '/admin/developer/update/password'
  },
  app: {
    page: '/admin/app',
    add: '/admin/app/save',
    update: '/admin/app/save',
    remove: '/admin/app/remove',
    updateClient: '/admin/app/client/update',
    resetClient: '/admin/app/reset',
    getApp: function (appId) {
      return `/admin/app/${appId}/info`
    },
    getClient: function () {
      return `/admin/app/client/info`
    },
    all: '/admin/app/all'
  },
  api: {
    page: '/admin/api',
    add: '/admin/api/add',
    update: '/admin/api/update',
    remove: '/admin/api/remove',
    all: '/admin/api/all',
    batchRemove: '/admin/api/batch/remove',
    batchUpdateOpen: '/admin/api/batch/update/open',
    batchUpdateStatus: '/admin/api/batch/update/status',
    batchUpdateAuth: '/admin/api/batch/update/auth'
  },
  menu: {
    add: '/admin/menu/save',
    update: '/admin/menu/save',
    remove: '/admin/menu/remove',
    all: '/admin/menu/list',
    appList: '/admin/menu/app/list',
    getMenu: function (menuId) {
      return `/admin/menu/${menuId}/info`
    }
  },
  action: {
    add: '/admin/action/save',
    update: '/admin/action/save',
    remove: '/admin/action/remove',
    all: '/admin/action/all',
    getActionsByMenu: '/admin/menu/action'
  },
  authority: {
    user: '/admin/authority/user',
    userAppAction: '/admin/authority/user/app/action',
    role: '/admin/authority/role',
    roleAppAction: '/admin/authority/role/app/action',
    app: '/admin/authority/app',
    menu: '/admin/authority/menu',
    appMenu: '/admin/authority/app/menu',
    api: '/admin/authority/api',
    action: '/admin/authority/action',
    userGrant: '/admin/authority/user/grant',
    userGrantA: '/admin/authority/user/granta',
    roleGrant: '/admin/authority/role/grant',
    roleGrantA: '/admin/authority/role/granta',
    appGrant: '/admin/authority/app/grant',
    actionGrant: '/admin/authority/action/grant'
  },
  login: {
    login: '/admin/login/token',
    logout: '/admin/logout/token',
    getUserInfo: '/admin/current/user',
    getUserMenu: '/admin/current/user/menu',
    getAppUserMenu: '/admin/current/user/app/menu',
    mobileLogin: '/admin/mobileLogin/token',
    getSmsCaptcha: '/sms/ captcha'
  },
  gateway: {
    refresh: '/actuator/open/refresh',
    getAccessLogs: '/admin/gateway/access/logs',
    getServiceList: '/admin/gateway/service/list'
  },
  routes: {
    page: '/admin/gateway/route',
    add: '/admin/gateway/route/add',
    update: '/admin/gateway/route/update',
    remove: '/admin/gateway/route/remove'
  },
  rateLimit: {
    page: '/admin/gateway/limit/rate',
    add: '/admin/gateway/limit/rate/add',
    update: '/admin/gateway/limit/rate/update',
    remove: '/admin/gateway/limit/rate/remove',
    getRateLimitApis: '/admin/gateway/limit/rate/api/list',
    addRateLimitApis: '/admin/gateway/limit/rate/api/add'
  },
  ipLimit: {
    page: '/admin/gateway/limit/ip',
    add: '/admin/gateway/limit/ip/add',
    update: '/admin/gateway/limit/ip/update',
    remove: '/admin/gateway/limit/ip/remove',
    getIpLimitApis: '/admin/gateway/limit/ip/api/list',
    addIpLimitApis: '/admin/gateway/limit/ip/api/add'
  },
  jobs: {
    page: '/admin/job',
    add: '/admin/job/add/http',
    update: '/admin/job/update/http',
    remove: '/admin/job/delete',
    pause: '/admin/job/pause',
    resume: '/admin/job/resume',
    getLogs: '/admin/job/logs'
  },
  msg: {
    getLogs: '/admin/webhook/logs'
  },
  generate: {
    tables: '/admin/generate/tables',
    execute: '/admin/generate/execute',
    download: function () {
      return `${process.env.VUE_APP_API_BASE_URL}/code/generate/download`
    }
  }
}
export default apis
